package com.example.test;

/**
 * Created by SOAL on 2017/3/14 0014.
 */
public class ExDemo {

    public static void main(String[] args) {

        A aa=new B();
        aa.say();
    }
}



class A{

    static{
        System.out.println("s-a");
    }

    {
        System.out.println("t-a");
    }
    public A(){
        super();
        System.out.println("c-a ");
    }

    public void say(){
        System.out.println("f-a");
    }
}

class B extends A{


    static{
        System.out.println("s-b");
    }

    {
        System.out.println("t-b");
    }
    public B(){
        System.out.println("c-b ");
    }
    public void say(){
        System.out.println("f-b");
    }
}